		</div>		 
	<script src="<?php bloginfo('template_directory'); ?>/js/plugins.js"></script>
	<script src="<?php bloginfo('template_directory'); ?>/js/main.js"></script>
	<?php 
		wp_footer(); 
		$boot_supersized = get_option('bg-supersized');
		$backgs = array();
		
		if($boot_supersized != NULL && !empty($boot_supersized)){
			foreach($boot_supersized as $photo_id){
				$image = wp_get_attachment_image_src($photo_id, 'full');
				$backgs[] = str_replace(get_option('home'),"boot",$image[0]);
			}
		}	
	?>
	<script>			
		jQuery(function($){	
			$.supersized({				
				slide_interval:   5000,
				transition    :   1,
				transition_speed :	700,									  
				slides:[
					<?php foreach($backgs as $bg): ?>
					{image : "<?php echo $bg; ?>"},
					<?php endforeach; ?>						
				]
			});
			<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
			var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
			(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
			g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
			s.parentNode.insertBefore(g,s)}(document,'script'));										
						
			var historyCount = 0;
			
			function getLanguagebar(){
				var lang = $('body').attr('lang');				
				//en-US
				//nl-NL
				var current_lang = location.href;
				var other_lang = $('.panel.active a.lang_sel_other').attr('href');
				
			}						
			
			function goToPanel(href) {								
				jQuery.ajax({
					url: href,		
					beforeSend: function(){						
						//$('#loading').show();
						jQuery('.panel.active .panelContent .container-860').html('<div class="loadding-content"></div>');
					},
					success: function(data) {							
						jQuery('.panel.active .panelContent .container-860').fadeOut('fast', function(){								
							jQuery('.panel.active .panelContent .container-860').html(data).fadeTo('fast', 1, function() {});								
							// update the page title
							var title = jQuery('.panel.active .panelContent .container-860').find('h1.entry-title').text();	
							jQuery('head').find('title').html(title);	
							getLanguagebar();
						});						
					}
				});
			}
			
			function gotoContent(href){
				
			}
			
			var activePanel = $("#accordion div.panel.active");
			if(activePanel.length != 1)
				activePanel = $("#accordion div.panel:first");
			$(activePanel).addClass('active'); 
			$("#accordion").delegate('.panel', 'click', function(e){
				var cur = $(this);
				var href = $(this).find('.pink:first').attr('href');
				var index 	= $(this).closest('.panel').index();				
				var hasdata	= $(this).closest('.panel').hasClass('hasdata');				
				if( ! $(this).is('.active') ){					
					//location.href = href;
					$(activePanel).animate({width: "78px"}, 'slow', function(){
						$(cur).animate({width: "860px"}, 'slow');
						$('#accordion .panel').removeClass('active');						
						$('body').removeClass('homepage');
						$(cur).addClass('active');
						$(cur).addClass('hasdata');
						activePanel = cur;
						if(index == 0){
							$('body').addClass('homepage');
						}
						if(index != 0 && hasdata == false){							
							goToPanel(href);
							if (typeof history.pushState !== "undefined") {
								history.pushState(null, null, href);
							}
						}												
					});					
				 };
			});	

			
			$('a[rel="pushstate-inline"]').live('click', function(){
				var href = $(this).attr('href');
				if(href != location.href){
					goToPanel(href);
					if (typeof history.pushState !== "undefined") {
						history.pushState(null, null, href);
					}
					return false;
				}
				return false;
			});
			
			
			$(window).load(function(){
				$('#set-menu ul.menu li a').each(function(){
					var link 	= $(this).attr('href');
					var index 	= $(this).closest('li').index();
					$('#accordion .panel .pink').eq(index).attr('href', link);
				});			
				getLanguagebar();
				$('#accordion .panel:last').addClass('last');
				
				var index 	= $(activePanel).closest('.panel').index();	
				if(index == 0){
					$('body').addClass('homepage');
				}
				
				var width = $(window).width();
				var height = $(window).height() - 14;
				var padding = Math.round((width - 1182 - 16)/2);
				$('.pink').css("height", height + 'px');
				$('.container-860').css("padding","0 " + padding + 'px');
				$('.panelContent').css("min-height",height + 'px');
				//alert(width);
			});
			
			window.onpopstate = function(){			
				if(historyCount) {
					goToPanel(document.location);
				}
				historyCount = historyCount + 1;
			};		

			
			
		});
	</script>	
    </body>
</html>